package com.cskaoyan.util;

import com.cskaoyan.mapper.PeriMissionListMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 创建日期: 2022/05/10 16:16
 *
 * @author 孙豪骏
 */
public class trash {
    @Autowired
    static PeriMissionListMapper periMissionListMapper;


    public static void main(String[] args) {
        String permission = "GET /admin/order/list,POST /admin/topic/create,POST /admin/role/permissions,GET /admin/feedback/list,POST /admin/groupon/create,GET /admin/stat/user,POST /admin/issue/delete,POST /admin/coupon/update,POST /admin/keyword/delete,POST /admin/role/update,GET /admin/config/express,POST /admin/admin/create,POST /admin/storage/create,POST /admin/brand/update,GET /admin/collect/list,POST /admin/admin/delete,GET /admin/config/wx,GET /admin/footprint/list,GET /admin/notice/read,POST /admin/brand/delete,POST /admin/groupon/delete,GET /admin/config/order,GET /admin/user/list,GET /admin/role/list,POST /admin/ad/delete,POST /admin/order/delete,GET /admin/config/mall,GET /admin/role/read,POST /admin/notice/create,POST /admin/order/refund,GET /admin/stat/order,GET /admin/notice/list,GET /admin/keyword/list,POST /admin/role/create,POST /admin/coupon/delete,POST /admin/config/wx,POST /admin/storage/delete,GET /admin/order/detail,GET /admin/groupon/list,POST /admin/keyword/create,GET /admin/keyword/read,POST /admin/category/create,POST /admin/topic/batch-delete,GET /admin/topic/list,GET /admin/coupon/read,POST /admin/order/ship,POST /admin/goods/create,POST /admin/topic/update,POST /admin/ad/create,GET /admin/topic/read,GET /admin/index/read,GET /admin/history/list,POST /admin/issue/update,GET /admin/coupon/list,POST /admin/order/reply,GET /admin/aftersale/list,POST /admin/storage/update,POST /admin/storage/read,POST /admin/role/delete,GET /admin/goods/list,GET /admin/ad/list,POST /admin/brand/create,POST /admin/config/express,GET /admin/storage/list,POST /admin/category/delete,GET /admin/category/read,POST /admin/keyword/update,POST /admin/notice/update,POST /admin/config/mall,GET /admin/ad/read,GET /admin/category/list,POST /admin/notice/batch-delete,GET /admin/issue/list,GET /admin/brand/list,POST /admin/topic/delete,GET /admin/address/list,POST /admin/groupon/update,GET /admin/log/list,POST /admin/coupon/create,GET /admin/brand/read,GET /admin/coupon/listuser,POST /admin/goods/update,GET /admin/comment/list,POST /admin/admin/update,POST /admin/goods/delete,POST /admin/aftersale/refund,GET /admin/goods/detail,GET /admin/admin/list,POST /admin/aftersale/batch-reject,POST /admin/config/order,POST /admin/index/write,POST /admin/ad/update,POST /admin/aftersale/batch-recept,POST /admin/aftersale/recept,POST /admin/aftersale/reject,GET /admin/role/permissions,POST /admin/category/update,GET /admin/admin/read,POST /admin/notice/delete,POST /admin/issue/create,GET /admin/stat/goods,GET /admin/groupon/listRecord,POST /admin/comment/delete";
        String orig = "GET /admin/order/list,POST /admin/topic/create,POST /admin/role/permissions,GET /admin/feedback/list,POST /admin/groupon/create,GET /admin/stat/user,POST /admin/issue/delete,POST /admin/coupon/update,POST /admin/keyword/delete,POST /admin/role/update,GET /admin/config/express,POST /admin/admin/create,POST /admin/storage/create,POST /admin/brand/update,GET /admin/collect/list,POST /admin/admin/delete,GET /admin/config/wx,GET /admin/footprint/list,GET /admin/notice/read,POST /admin/brand/delete,POST /admin/groupon/delete,GET /admin/config/order,GET /admin/user/list,GET /admin/role/list,POST /admin/ad/delete,POST /admin/order/delete,GET /admin/config/mall,GET /admin/role/read,POST /admin/notice/create,POST /admin/order/refund,GET /admin/stat/order,GET /admin/notice/list,GET /admin/keyword/list,POST /admin/role/create,POST /admin/coupon/delete,POST /admin/config/wx,POST /admin/storage/delete,GET /admin/order/detail,GET /admin/groupon/list,POST /admin/keyword/create,GET /admin/keyword/read,POST /admin/category/create,POST /admin/topic/batch-delete,GET /admin/topic/list,GET /admin/coupon/read,POST /admin/order/ship,POST /admin/goods/create,POST /admin/topic/update,POST /admin/ad/create,GET /admin/topic/read,GET /admin/index/read,GET /admin/history/list,POST /admin/issue/update,GET /admin/coupon/list,POST /admin/order/reply,GET /admin/aftersale/list,POST /admin/storage/update,POST /admin/storage/read,POST /admin/role/delete,GET /admin/goods/list,GET /admin/ad/list,POST /admin/brand/create,POST /admin/config/express,GET /admin/storage/list,POST /admin/category/delete,GET /admin/category/read,POST /admin/keyword/update,POST /admin/notice/update,POST /admin/config/mall,GET /admin/ad/read,GET /admin/category/list,POST /admin/notice/batch-delete,GET /admin/issue/list,GET /admin/brand/list,POST /admin/topic/delete,GET /admin/address/list,POST /admin/groupon/update,GET /admin/log/list,POST /admin/coupon/create,GET /admin/brand/read,GET /admin/coupon/listuser,POST /admin/goods/update,GET /admin/comment/list,POST /admin/admin/update,POST /admin/goods/delete,POST /admin/aftersale/refund,GET /admin/goods/detail,GET /admin/admin/list,POST /admin/aftersale/batch-reject,POST /admin/config/order,POST /admin/index/write,POST /admin/ad/update,POST /admin/aftersale/batch-recept,POST /admin/aftersale/recept,POST /admin/aftersale/reject,GET /admin/role/permissions,POST /admin/category/update,GET /admin/admin/read,POST /admin/notice/delete,POST /admin/issue/create,GET /admin/stat/goods,GET /admin/groupon/listRecord,POST /admin/comment/delete";
        String replace =" :admin:order:list, :admin:topic:create, :admin:role:permissions,:admin:feedback:list, :admin:groupon:create,:admin:stat:user, :admin:issue:delete, :admin:coupon:update, :admin:keyword:delete, :admin:role:update,:admin:config:express, :admin:admin:create, :admin:storage:create, :admin:brand:update,:admin:collect:list, :admin:admin:delete,:admin:config:wx,:admin:footprint:list,:admin:notice:read, :admin:brand:delete, :admin:groupon:delete,:admin:config:order,:admin:user:list,:admin:role:list, :admin:ad:delete, :admin:order:delete,:admin:config:mall,:admin:role:read, :admin:notice:create, :admin:order:refund,:admin:stat:order,:admin:notice:list,:admin:keyword:list, :admin:role:create, :admin:coupon:delete, :admin:config:wx, :admin:storage:delete,:admin:order:detail,:admin:groupon:list, :admin:keyword:create,:admin:keyword:read, :admin:category:create, :admin:topic:batch-delete,:admin:topic:list,:admin:coupon:read, :admin:order:ship, :admin:goods:create, :admin:topic:update, :admin:ad:create,:admin:topic:read,:admin:index:read,:admin:history:list, :admin:issue:update,:admin:coupon:list, :admin:order:reply,:admin:aftersale:list, :admin:storage:update, :admin:storage:read, :admin:role:delete,:admin:goods:list,:admin:ad:list, :admin:brand:create, :admin:config:express,:admin:storage:list, :admin:category:delete,:admin:category:read, :admin:keyword:update, :admin:notice:update, :admin:config:mall,:admin:ad:read,:admin:category:list, :admin:notice:batch-delete,:admin:issue:list,:admin:brand:list, :admin:topic:delete,:admin:address:list, :admin:groupon:update,:admin:log:list, :admin:coupon:create,:admin:brand:read,:admin:coupon:listuser, :admin:goods:update,:admin:comment:list, :admin:admin:update, :admin:goods:delete, :admin:aftersale:refund,:admin:goods:detail,:admin:admin:list, :admin:aftersale:batch-reject, :admin:config:order, :admin:index:write, :admin:ad:update, :admin:aftersale:batch-recept, :admin:aftersale:recept, :admin:aftersale:reject,:admin:role:permissions, :admin:category:update,:admin:admin:read, :admin:notice:delete, :admin:issue:create,:admin:stat:goods,:admin:groupon:listRecord, :admin:comment:delete";
        String[] split1 = replace.split(",");
        String  [] perms=new String[split1.length];
        for (int i = 0; i < split1.length; i++) {
         perms[i]=split1[i].replace(" :","");
        }
          String [] result=perms;
          String[] req = permission.split(",");
        for (int i = 0; i < result.length; i++) {
            periMissionListMapper.insertIntoPermission(req[i],result[i]);
        }
    }

}